<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
<!--    专辑介绍-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Introduction')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-introduction" class="form-control editor" rows="5" name="row[introduction]" cols="50"></textarea>
        </div>
    </div>
<!--    讲师介绍-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('lecturer_introduction')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-lecturer_introduction" class="form-control editor" rows="5" name="row[lecturer_introduction]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover_image" data-rule="required" class="form-control hidden" size="50" name="row[cover_image]" type="text">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="faupload-cover_image"
                                class="btn btn-danger faupload"
                                data-input-id="c-cover_image"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                data-multiple="false"
                                data-preview-id="p-cover_image">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span><button type="button" id="fachoose-cover_image" class="btn btn-primary fachoose" data-input-id="c-cover_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-cover_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Table_name')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-table_name" data-rule="required" class="form-control selectpicker" name="row[table_name]">
                {foreach name="tableNameList" item="vo"}
                    <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-category_id" data-rule="required" class="form-control selectpicker" name="row[category_id]">
               {foreach $categoryList as $v}
                <option value="{$v['id']}">{$v['platename']}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_price" class="form-control" step="0.01" name="row[membership_price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Membership_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-membership_duration" class="form-control" name="row[membership_duration]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Creattime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-creattime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[creattime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>

    <!--排序-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('sort')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="row[sort]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0" placeholder="数字越大排序越靠前">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
